package com.googlecode.jyoutubeuploader.util;

public class StringUtils extends org.apache.commons.lang3.StringUtils {

	/**
	 * Will return the first non-null supplied items, otherwise if all supplied items
	 * are null, then null will be returned.
	 * 
	 * @param <T>
	 * @param items
	 * @return see above
	 */
	public static <T> T coalesce(T ...items) {
		for (T currentItem : items) {
			if (currentItem != null) {
				return currentItem;
			}
		}
		return null;
	}
}
